package com.leoman.plz_p.module.bean;


import java.io.Serializable;

import cn.com.corelib.subscribe.ResponseHandler;

/**
 * Created by guoh on 2017/2/28.
 */

public class BaseData<T> implements Serializable ,ResponseHandler.IBaseData{

    /**
     * 消息
     */
    public String message;
    /**
     * 0成功 1错误
     */
    public int code;
    /**
     * 数据
     */
    public T data;

    @Override
    public boolean isSuccess() {
        return code==0;
    }

    @Override
    public int status() {
        return code;
    }

    @Override
    public Object data() {
        return data;
    }

    @Override
    public String msg() {
        return message;
    }
}
